package com.toommi.refuse.service;

import com.github.pagehelper.PageInfo;
import com.toommi.refuse.entity.LargeAppointme;
import com.toommi.refuse.entity.Ordertableinfo;
import com.toommi.refuse.exception.AppUserException;
import com.toommi.refuse.exception.CommonStatusException;
import com.toommi.refuse.exception.RefuseTypeException;
import com.toommi.refuse.exception.WechatUserException;

import javax.servlet.http.HttpServletRequest;
import java.util.Map;

/**
 * ..
 * 大件垃圾回收预约服务
 *
 * @author yangg
 * @since 2019-07-26 11:20
 */
public interface LargeAppointmeService {
    /**
     * 新增大件垃圾回收预约
     *

     */
    void addAppointme(HttpServletRequest request) throws WechatUserException, RefuseTypeException;

    /**
     * 删除指定的预约信息
     *
     * @param id 预约消息id
     */
    void deleteAppointme(long id);

    /**
     * 修改预约信息
     *
     * @param appointme 预约信息
     */
    void updateAppointme(LargeAppointme appointme) throws RefuseTypeException, AppUserException, CommonStatusException;

    /**
     * 条件查询大件预约信息
     *
     * @param pageNum         页码
     * @param pageSize        每页数据量
     * @param wechatUserId    微信用户id
     * @param appUserId       app用户id
     * @param status          状态
     * @param districtId      行政区id
     * @param streetId        街道id
     * @param neighbourhoodId 小区id
     * @param startTime 开始时间
     * @param endTime 截止时间
     * @return 大件预约信息列表分页对象
     */
    PageInfo<LargeAppointme> findAppoints(int pageNum, int pageSize, long wechatUserId,
                                          long appUserId, int status, String districtId,
                                          String streetId, long neighbourhoodId,long startTime,long endTime);

    /**
     * 根据id查询预约详情信息
     *
     * @param id 预约id
     * @return 详情信息
     */
    LargeAppointme findDetail(long id) throws RefuseTypeException;

    /**
     * 测试
     * @param id
     */
    Map<String,Object> deleteAppointTest(long id);

    Object orderlist(HttpServletRequest request)throws RefuseTypeException, AppUserException, CommonStatusException;

    Object orderinfo(HttpServletRequest request)throws RefuseTypeException, AppUserException, CommonStatusException;

    void Settlement(Ordertableinfo ordertableinfo) throws RefuseTypeException;

    void updatestatus(String id, String status)throws RefuseTypeException;

    Object getappinfo(HttpServletRequest request)throws RefuseTypeException;

    Object getuserinfo(HttpServletRequest request)throws RefuseTypeException;

    void updateuserinfo(HttpServletRequest request)throws RefuseTypeException;

    void updateTypeContentById(String id,String type) throws RefuseTypeException;

    Map<String, Object> getLastPhoneAndAddr(HttpServletRequest request);

}
